package com.vone.ui;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JCheckBox;

import com.vone.util.ImageUtil;

public class MyCheckBox extends JCheckBox {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String id;
	public MyCheckBox(){
		super();
		init();
	}
	
	public MyCheckBox(Icon icon){
		super(icon);
		init();
	}
	
	public MyCheckBox(Action action){
		super(action);
		init();
	}
	
	public MyCheckBox(Icon icon,boolean flag){
		super(icon,flag);
		init();
	}
	
	public MyCheckBox(String str){
		super(str);
		init();
	}
	
	public MyCheckBox(String str,boolean flag){
		super(str,flag);
		init();
	}
	
	public MyCheckBox(String str,Icon icon){
		super(str,icon);
		init();
	}
	
	public MyCheckBox(String str,Icon icon,boolean flag){
		super(str,icon,flag);
		init();
	}
	
	public void init(){
		this.setOpaque(false);
		this.setFocusPainted(false);
		this.setIcon(ImageUtil.getCheckBoxUnselected());
		this.setSelectedIcon(ImageUtil.getCheckBoxSelected());
		this.setRolloverIcon(ImageUtil.getCheckBoxUnselected());
		this.setPressedIcon(ImageUtil.getCheckBoxSelected());
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
